home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 06 - 1990 / 06.07 Jul 90 / Printing Primer ƒ / PrintParagraph.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-11-15  |  1.3 KB  |  53 lines  |  [TEXT/KAHL]

  1. /*******************************************\
  2. *    file:         ReportMaker.c                *
  3. *    version:    0.1ß                        *
  4. *     XFCN ID        503                            *
  5. *                                            *
  6. * Print a paragraph from Hypercard using the*
  7. * the rules described :                        *
  8. *                                            *
  9. * Paragraph are runs of text that have out-    *
  10. * dent and indent characters (typically     *
  11. * outline numbers and such).                *
  12. *                                             *
  13. *                                            *
  14. * -----------------------------------------    *
  15. * By:    Donald Koscheka                        *
  16. * Date:    30-OCT-89                            *
  17. * ©    Copyright 1989, Donald Koscheka            *
  18. *    All Rights Reserved                        *
  19. *                                            *
  20. * -----------------------------------------    *
  21. \*******************************************/
  22.  
  23. #include <MacTypes.h>
  24. #include <MemoryMgr.h>
  25. #include <ResourceMgr.h>
  26. #include <OSUtil.h>
  27. #include <HyperXCmd.h>
  28. #include <HyperUtils.h>
  29. #include <PrintMgr.h>
  30. #include "ReportUtils.h"
  31.  
  32.  
  33.  
  34. pascal void main( paramPtr )
  35.     XCmdBlockPtr    paramPtr;
  36. /**********************************
  37. * params[0] == the text to print.
  38. * params[1] == text to the left of paragraph
  39. * params[2] == text to the right of paragraph
  40. **********************************/
  41. {
  42.     Handle        pH;
  43.     pInfoPtr    pp;
  44.     
  45.     if( paramPtr->paramCount && ( pH = GetSystemResource( PAGE_INFO, PAGE_ID ) ) ){
  46.         pp = (pInfoPtr)*pH;
  47.         
  48.         DrawParagraph( pp,paramPtr->params[0],paramPtr->params[1],paramPtr->params[2] );
  49.     }
  50.     paramPtr->returnValue = NIL;
  51. }
  52.  
  53.